<template>
  <div class="dashboard-container">
    <el-row>
      <el-col>
        <MyBarChart />
      </el-col>
    </el-row>

    <el-row style="margin-top:10px">
      <el-col>
        <BarChart />
      </el-col>
    </el-row>
  </div>
</template>

<script>
import MyBarChart from '@/components/echartsComponents/MyBarChart.vue'
import BarChart from '@/components/echartsComponents/tets.vue'

export default {
  name: 'Home',
  components: {
    MyBarChart,
    BarChart
  },
  data() {
    return {

    }
  },
  beforeRouteEnter(to, from, next) {
    next(vm => {
      // console.log(from)
      // 通过 `vm` 访问组件实例
      if (from.path === '/login') {
        vm.$notify({
          message: '欢迎回来！亲',
          title: '登录成功',
          type: 'success',
          duration: 1500
        })
      }
    })
  }

}
</script>

<style lang="scss" scoped>
@import "~@/styles/mixin.scss";

.dashboard-container {
@include main-padding;
 .mybar-chart{
      background: #f8f5f5;
      border-radius: 4px;

 }
}
</style>
